package chapter10;

public class Chapter10Main {

    public static void main(String[] args) {
//        Node head = new Node();
//        push(head, 1);
//        System.out.println(head);
//        int val = pop(head);
//        System.out.println(val);
        LinkedList.Node node1 = new LinkedList.Node(1);
        LinkedList.Node node2 = new LinkedList.Node(2);
        LinkedList.Node node3 = new LinkedList.Node(3);
        LinkedList.Node node4 = new LinkedList.Node(4);

        node3.next = node4;
        node2.next = node3;
        node1.next = node2;

        LinkedList.Node temp = LinkedList.reverse(node1);
        while (temp != null) {
            System.out.println(temp.key);

            temp = temp.next;
        }
    }

}
